.class public Lcom/xingbook/ui/DragOrderGridView;
.super Landroid/widget/GridView;


# instance fields
.field private a:J

.field private b:Z

.field private c:Z

.field private d:I

.field private e:I

.field private f:I

.field private g:I

.field private h:I

.field private i:Landroid/view/View;

.field private j:Landroid/widget/ImageView;

.field private k:Landroid/os/Vibrator;

.field private l:Landroid/view/WindowManager;

.field private m:Landroid/view/WindowManager$LayoutParams;

.field private n:Landroid/graphics/Bitmap;

.field private o:I

.field private p:I

.field private q:I

.field private r:I

.field private s:I

.field private t:I

.field private u:I

.field private v:Lcom/xingbook/ui/c;

.field private w:Landroid/os/Handler;

.field private x:Ljava/lang/Runnable;

.field private y:Ljava/lang/Runnable;


# direct methods
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
    .locals 1

    const/4 v0, 0x0

    invoke-direct {p0, p1, p2, v0}, Lcom/xingbook/ui/DragOrderGridView;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V

    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
    .locals 3

    const/4 v2, 0x0

    invoke-direct {p0, p1, p2, p3}, Landroid/widget/GridView;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V

    const-wide/16 v0, 0x320

    iput-wide v0, p0, Lcom/xingbook/ui/DragOrderGridView;->a:J

    iput-boolean v2, p0, Lcom/xingbook/ui/DragOrderGridView;->b:Z

    iput-boolean v2, p0, Lcom/xingbook/ui/DragOrderGridView;->c:Z

    const/4 v0, 0x0

    iput-object v0, p0, Lcom/xingbook/ui/DragOrderGridView;->i:Landroid/view/View;

    new-instance v0, Landroid/os/Handler;

    invoke-direct {v0}, Landroid/os/Handler;-><init>()V

    iput-object v0, p0, Lcom/xingbook/ui/DragOrderGridView;->w:Landroid/os/Handler;

    new-instance v0, Lcom/xingbook/ui/a;

    invoke-direct {v0, p0}, Lcom/xingbook/ui/a;-><init>(Lcom/xingbook/ui/DragOrderGridView;)V

    iput-object v0, p0, Lcom/xingbook/ui/DragOrderGridView;->x:Ljava/lang/Runnable;

    new-instance v0, Lcom/xingbook/ui/b;

    invoke-direct {v0, p0}, Lcom/xingbook/ui/b;-><init>(Lcom/xingbook/ui/DragOrderGridView;)V

    iput-object v0, p0, Lcom/xingbook/ui/DragOrderGridView;->y:Ljava/lang/Runnable;

    const-string v0, "vibrator"

    invoke-virtual {p1, v0}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/os/Vibrator;

    iput-object v0, p0, Lcom/xingbook/ui/DragOrderGridView;->k:Landroid/os/Vibrator;

    const-string v0, "window"

    invoke-virtual {p1, v0}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/view/WindowManager;

    iput-object v0, p0, Lcom/xingbook/ui/DragOrderGridView;->l:Landroid/view/WindowManager;

    invoke-static {p1}, Lcom/xingbook/ui/DragOrderGridView;->a(Landroid/content/Context;)I

    move-result v0

    iput v0, p0, Lcom/xingbook/ui/DragOrderGridView;->s:I

    return-void
.end method

.method private static a(Landroid/content/Context;)I
    .locals 4

    new-instance v1, Landroid/graphics/Rect;

    invoke-direct {v1}, Landroid/graphics/Rect;-><init>()V

    move-object v0, p0

    check-cast v0, Landroid/app/Activity;

    invoke-virtual {v0}, Landroid/app/Activity;->getWindow()Landroid/view/Window;

    move-result-object v0

    invoke-virtual {v0}, Landroid/view/Window;->getDecorView()Landroid/view/View;

    move-result-object v0

    invoke-virtual {v0, v1}, Landroid/view/View;->getWindowVisibleDisplayFrame(Landroid/graphics/Rect;)V

    iget v0, v1, Landroid/graphics/Rect;->top:I

    if-nez v0, :cond_0

    :try_start_0
    const-string v1, "com.android.internal.R$dimen"

    invoke-static {v1}, Ljava/lang/Class;->forName(Ljava/lang/String;)Ljava/lang/Class;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/Class;->newInstance()Ljava/lang/Object;

    move-result-object v2

    const-string v3, "status_bar_height"

    invoke-virtual {v1, v3}, Ljava/lang/Class;->getField(Ljava/lang/String;)Ljava/lang/reflect/Field;

    move-result-object v1

    invoke-virtual {v1, v2}, Ljava/lang/reflect/Field;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-static {v1}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I

    move-result v1

    invoke-virtual {p0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v2

    invoke-virtual {v2, v1}, Landroid/content/res/Resources;->getDimensionPixelSize(I)I
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    move-result v0

    :cond_0
    :goto_0
    return v0

    :catch_0
    move-exception v1

    invoke-virtual {v1}, Ljava/lang/Exception;->printStackTrace()V

    goto :goto_0
.end method

.method private a()V
    .locals 2

    iget-object v0, p0, Lcom/xingbook/ui/DragOrderGridView;->j:Landroid/widget/ImageView;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/xingbook/ui/DragOrderGridView;->l:Landroid/view/WindowManager;

    iget-object v1, p0, Lcom/xingbook/ui/DragOrderGridView;->j:Landroid/widget/ImageView;

    invoke-interface {v0, v1}, Landroid/view/WindowManager;->removeView(Landroid/view/View;)V

    const/4 v0, 0x0

    iput-object v0, p0, Lcom/xingbook/ui/DragOrderGridView;->j:Landroid/widget/ImageView;

    :cond_0
    return-void
.end method

.method private a(II)V
    .locals 3

    iget-object v0, p0, Lcom/xingbook/ui/DragOrderGridView;->m:Landroid/view/WindowManager$LayoutParams;

    iget v1, p0, Lcom/xingbook/ui/DragOrderGridView;->p:I

    sub-int v1, p1, v1

    iget v2, p0, Lcom/xingbook/ui/DragOrderGridView;->r:I

    add-int/2addr v1, v2

    iput v1, v0, Landroid/view/WindowManager$LayoutParams;->x:I

    iget-object v0, p0, Lcom/xingbook/ui/DragOrderGridView;->m:Landroid/view/WindowManager$LayoutParams;

    iget v1, p0, Lcom/xingbook/ui/DragOrderGridView;->o:I

    sub-int v1, p2, v1

    iget v2, p0, Lcom/xingbook/ui/DragOrderGridView;->q:I

    add-int/2addr v1, v2

    iget v2, p0, Lcom/xingbook/ui/DragOrderGridView;->s:I

    sub-int/2addr v1, v2

    iput v1, v0, Landroid/view/WindowManager$LayoutParams;->y:I

    iget-object v0, p0, Lcom/xingbook/ui/DragOrderGridView;->l:Landroid/view/WindowManager;

    iget-object v1, p0, Lcom/xingbook/ui/DragOrderGridView;->j:Landroid/widget/ImageView;

    iget-object v2, p0, Lcom/xingbook/ui/DragOrderGridView;->m:Landroid/view/WindowManager$LayoutParams;

    invoke-interface {v0, v1, v2}, Landroid/view/WindowManager;->updateViewLayout(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V

    invoke-direct {p0, p1, p2}, Lcom/xingbook/ui/DragOrderGridView;->b(II)V

    iget-object v0, p0, Lcom/xingbook/ui/DragOrderGridView;->w:Landroid/os/Handler;

    iget-object v1, p0, Lcom/xingbook/ui/DragOrderGridView;->y:Ljava/lang/Runnable;

    invoke-virtual {v0, v1}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z

    return-void
.end method

.method private a(Landroid/graphics/Bitmap;II)V
    .locals 4

    const/4 v3, -0x2

    new-instance v0, Landroid/view/WindowManager$LayoutParams;

    invoke-direct {v0}, Landroid/view/WindowManager$LayoutParams;-><init>()V

    iput-object v0, p0, Lcom/xingbook/ui/DragOrderGridView;->m:Landroid/view/WindowManager$LayoutParams;

    iget-object v0, p0, Lcom/xingbook/ui/DragOrderGridView;->m:Landroid/view/WindowManager$LayoutParams;

    const/4 v1, -0x3

    iput v1, v0, Landroid/view/WindowManager$LayoutParams;->format:I

    iget-object v0, p0, Lcom/xingbook/ui/DragOrderGridView;->m:Landroid/view/WindowManager$LayoutParams;

    const/16 v1, 0x33

    iput v1, v0, Landroid/view/WindowManager$LayoutParams;->gravity:I

    iget-object v0, p0, Lcom/xingbook/ui/DragOrderGridView;->m:Landroid/view/WindowManager$LayoutParams;

    iget v1, p0, Lcom/xingbook/ui/DragOrderGridView;->p:I

    sub-int v1, p2, v1

    iget v2, p0, Lcom/xingbook/ui/DragOrderGridView;->r:I

    add-int/2addr v1, v2

    iput v1, v0, Landroid/view/WindowManager$LayoutParams;->x:I

    iget-object v0, p0, Lcom/xingbook/ui/DragOrderGridView;->m:Landroid/view/WindowManager$LayoutParams;

    iget v1, p0, Lcom/xingbook/ui/DragOrderGridView;->o:I

    sub-int v1, p3, v1

    iget v2, p0, Lcom/xingbook/ui/DragOrderGridView;->q:I

    add-int/2addr v1, v2

    iget v2, p0, Lcom/xingbook/ui/DragOrderGridView;->s:I

    sub-int/2addr v1, v2

    iput v1, v0, Landroid/view/WindowManager$LayoutParams;->y:I

    iget-object v0, p0, Lcom/xingbook/ui/DragOrderGridView;->m:Landroid/view/WindowManager$LayoutParams;

    const v1, 0x3f0ccccd

    iput v1, v0, Landroid/view/WindowManager$LayoutParams;->alpha:F

    iget-object v0, p0, Lcom/xingbook/ui/DragOrderGridView;->m:Landroid/view/WindowManager$LayoutParams;

    iput v3, v0, Landroid/view/WindowManager$LayoutParams;->width:I

    iget-object v0, p0, Lcom/xingbook/ui/DragOrderGridView;->m:Landroid/view/WindowManager$LayoutParams;

    iput v3, v0, Landroid/view/WindowManager$LayoutParams;->height:I

    iget-object v0, p0, Lcom/xingbook/ui/DragOrderGridView;->m:Landroid/view/WindowManager$LayoutParams;

    const/16 v1, 0x18

    iput v1, v0, Landroid/view/WindowManager$LayoutParams;->flags:I

    new-instance v0, Landroid/widget/ImageView;

    invoke-virtual {p0}, Lcom/xingbook/ui/DragOrderGridView;->getContext()Landroid/content/Context;

    move-result-object v1

    invoke-direct {v0, v1}, Landroid/widget/ImageView;-><init>(Landroid/content/Context;)V

    iput-object v0, p0, Lcom/xingbook/ui/DragOrderGridView;->j:Landroid/widget/ImageView;

    iget-object v0, p0, Lcom/xingbook/ui/DragOrderGridView;->j:Landroid/widget/ImageView;

    invoke-virtual {v0, p1}, Landroid/widget/ImageView;->setImageBitmap(Landroid/graphics/Bitmap;)V

    iget-object v0, p0, Lcom/xingbook/ui/DragOrderGridView;->l:Landroid/view/WindowManager;

    iget-object v1, p0, Lcom/xingbook/ui/DragOrderGridView;->j:Landroid/widget/ImageView;

    iget-object v2, p0, Lcom/xingbook/ui/DragOrderGridView;->m:Landroid/view/WindowManager$LayoutParams;

    invoke-interface {v0, v1, v2}, Landroid/view/WindowManager;->addView(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V

    return-void
.end method

.method static synthetic a(Lcom/xingbook/ui/DragOrderGridView;II)V
    .locals 0

    invoke-direct {p0, p1, p2}, Lcom/xingbook/ui/DragOrderGridView;->b(II)V

    return-void
.end method

.method static synthetic a(Lcom/xingbook/ui/DragOrderGridView;Landroid/graphics/Bitmap;II)V
    .locals 0

    invoke-direct {p0, p1, p2, p3}, Lcom/xingbook/ui/DragOrderGridView;->a(Landroid/graphics/Bitmap;II)V

    return-void
.end method

.method static synthetic a(Lcom/xingbook/ui/DragOrderGridView;Z)V
    .locals 0

    iput-boolean p1, p0, Lcom/xingbook/ui/DragOrderGridView;->b:Z

    return-void
.end method

.method private a(Landroid/view/View;II)Z
    .locals 4

    const/4 v0, 0x0

    if-nez p1, :cond_1

    :cond_0
    :goto_0
    return v0

    :cond_1
    invoke-virtual {p1}, Landroid/view/View;->getLeft()I

    move-result v1

    invoke-virtual {p1}, Landroid/view/View;->getTop()I

    move-result v2

    if-lt p2, v1, :cond_0

    invoke-virtual {p1}, Landroid/view/View;->getWidth()I

    move-result v3

    add-int/2addr v1, v3

    if-gt p2, v1, :cond_0

    if-lt p3, v2, :cond_0

    invoke-virtual {p1}, Landroid/view/View;->getHeight()I

    move-result v1

    add-int/2addr v1, v2

    if-gt p3, v1, :cond_0

    const/4 v0, 0x1

    goto :goto_0
.end method

.method static synthetic a(Lcom/xingbook/ui/DragOrderGridView;)Z
    .locals 1

    iget-boolean v0, p0, Lcom/xingbook/ui/DragOrderGridView;->c:Z

    return v0
.end method

.method static synthetic b(Lcom/xingbook/ui/DragOrderGridView;)Landroid/os/Vibrator;
    .locals 1

    iget-object v0, p0, Lcom/xingbook/ui/DragOrderGridView;->k:Landroid/os/Vibrator;

    return-object v0
.end method

.method private b()V
    .locals 2

    iget-object v0, p0, Lcom/xingbook/ui/DragOrderGridView;->v:Lcom/xingbook/ui/c;

    invoke-interface {v0}, Lcom/xingbook/ui/c;->a()V

    iget v0, p0, Lcom/xingbook/ui/DragOrderGridView;->h:I

    invoke-virtual {p0}, Lcom/xingbook/ui/DragOrderGridView;->getFirstVisiblePosition()I

    move-result v1

    sub-int/2addr v0, v1

    invoke-virtual {p0, v0}, Lcom/xingbook/ui/DragOrderGridView;->getChildAt(I)Landroid/view/View;

    move-result-object v0

    if-eqz v0, :cond_0

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Landroid/view/View;->setVisibility(I)V

    :cond_0
    invoke-direct {p0}, Lcom/xingbook/ui/DragOrderGridView;->a()V

    return-void
.end method

.method private b(II)V
    .locals 3

    invoke-virtual {p0, p1, p2}, Lcom/xingbook/ui/DragOrderGridView;->pointToPosition(II)I

    move-result v0

    iget v1, p0, Lcom/xingbook/ui/DragOrderGridView;->h:I

    if-eq v0, v1, :cond_1

    const/4 v1, -0x1

    if-eq v0, v1, :cond_1

    iget-object v1, p0, Lcom/xingbook/ui/DragOrderGridView;->v:Lcom/xingbook/ui/c;

    if-eqz v1, :cond_0

    iget-object v1, p0, Lcom/xingbook/ui/DragOrderGridView;->v:Lcom/xingbook/ui/c;

    iget v2, p0, Lcom/xingbook/ui/DragOrderGridView;->h:I

    invoke-interface {v1, v2, v0}, Lcom/xingbook/ui/c;->a(II)V

    :cond_0
    invoke-virtual {p0}, Lcom/xingbook/ui/DragOrderGridView;->getFirstVisiblePosition()I

    move-result v1

    sub-int v1, v0, v1

    invoke-virtual {p0, v1}, Lcom/xingbook/ui/DragOrderGridView;->getChildAt(I)Landroid/view/View;

    move-result-object v1

    const/4 v2, 0x4

    invoke-virtual {v1, v2}, Landroid/view/View;->setVisibility(I)V

    iget v1, p0, Lcom/xingbook/ui/DragOrderGridView;->h:I

    invoke-virtual {p0}, Lcom/xingbook/ui/DragOrderGridView;->getFirstVisiblePosition()I

    move-result v2

    sub-int/2addr v1, v2

    invoke-virtual {p0, v1}, Lcom/xingbook/ui/DragOrderGridView;->getChildAt(I)Landroid/view/View;

    move-result-object v1

    const/4 v2, 0x0

    invoke-virtual {v1, v2}, Landroid/view/View;->setVisibility(I)V

    iput v0, p0, Lcom/xingbook/ui/DragOrderGridView;->h:I

    :cond_1
    return-void
.end method

.method static synthetic c(Lcom/xingbook/ui/DragOrderGridView;)Landroid/view/View;
    .locals 1

    iget-object v0, p0, Lcom/xingbook/ui/DragOrderGridView;->i:Landroid/view/View;

    return-object v0
.end method

.method static synthetic d(Lcom/xingbook/ui/DragOrderGridView;)Landroid/graphics/Bitmap;
    .locals 1

    iget-object v0, p0, Lcom/xingbook/ui/DragOrderGridView;->n:Landroid/graphics/Bitmap;

    return-object v0
.end method

.method static synthetic e(Lcom/xingbook/ui/DragOrderGridView;)I
    .locals 1

    iget v0, p0, Lcom/xingbook/ui/DragOrderGridView;->d:I

    return v0
.end method

.method static synthetic f(Lcom/xingbook/ui/DragOrderGridView;)I
    .locals 1

    iget v0, p0, Lcom/xingbook/ui/DragOrderGridView;->e:I

    return v0
.end method

.method static synthetic g(Lcom/xingbook/ui/DragOrderGridView;)I
    .locals 1

    iget v0, p0, Lcom/xingbook/ui/DragOrderGridView;->g:I

    return v0
.end method

.method static synthetic h(Lcom/xingbook/ui/DragOrderGridView;)I
    .locals 1

    iget v0, p0, Lcom/xingbook/ui/DragOrderGridView;->u:I

    return v0
.end method

.method static synthetic i(Lcom/xingbook/ui/DragOrderGridView;)Landroid/os/Handler;
    .locals 1

    iget-object v0, p0, Lcom/xingbook/ui/DragOrderGridView;->w:Landroid/os/Handler;

    return-object v0
.end method

.method static synthetic j(Lcom/xingbook/ui/DragOrderGridView;)Ljava/lang/Runnable;
    .locals 1

    iget-object v0, p0, Lcom/xingbook/ui/DragOrderGridView;->y:Ljava/lang/Runnable;

    return-object v0
.end method

.method static synthetic k(Lcom/xingbook/ui/DragOrderGridView;)I
    .locals 1

    iget v0, p0, Lcom/xingbook/ui/DragOrderGridView;->t:I

    return v0
.end method

.method static synthetic l(Lcom/xingbook/ui/DragOrderGridView;)I
    .locals 1

    iget v0, p0, Lcom/xingbook/ui/DragOrderGridView;->f:I

    return v0
.end method


# virtual methods
.method public dispatchTouchEvent(Landroid/view/MotionEvent;)Z
    .locals 4

    invoke-virtual {p1}, Landroid/view/MotionEvent;->getAction()I

    move-result v0

    packed-switch v0, :pswitch_data_0

    :cond_0
    :goto_0
    invoke-super {p0, p1}, Landroid/widget/GridView;->dispatchTouchEvent(Landroid/view/MotionEvent;)Z

    move-result v0

    :goto_1
    return v0

    :pswitch_0
    iget-object v0, p0, Lcom/xingbook/ui/DragOrderGridView;->w:Landroid/os/Handler;

    iget-object v1, p0, Lcom/xingbook/ui/DragOrderGridView;->x:Ljava/lang/Runnable;

    iget-wide v2, p0, Lcom/xingbook/ui/DragOrderGridView;->a:J

    invoke-virtual {v0, v1, v2, v3}, Landroid/os/Handler;->postDelayed(Ljava/lang/Runnable;J)Z

    invoke-virtual {p1}, Landroid/view/MotionEvent;->getX()F

    move-result v0

    float-to-int v0, v0

    iput v0, p0, Lcom/xingbook/ui/DragOrderGridView;->d:I

    invoke-virtual {p1}, Landroid/view/MotionEvent;->getY()F

    move-result v0

    float-to-int v0, v0

    iput v0, p0, Lcom/xingbook/ui/DragOrderGridView;->e:I

    iget v0, p0, Lcom/xingbook/ui/DragOrderGridView;->d:I

    iget v1, p0, Lcom/xingbook/ui/DragOrderGridView;->e:I

    invoke-virtual {p0, v0, v1}, Lcom/xingbook/ui/DragOrderGridView;->pointToPosition(II)I

    move-result v0

    iput v0, p0, Lcom/xingbook/ui/DragOrderGridView;->h:I

    iget v0, p0, Lcom/xingbook/ui/DragOrderGridView;->h:I

    const/4 v1, -0x1

    if-ne v0, v1, :cond_1

    invoke-super {p0, p1}, Landroid/widget/GridView;->dispatchTouchEvent(Landroid/view/MotionEvent;)Z

    move-result v0

    goto :goto_1

    :cond_1
    iget v0, p0, Lcom/xingbook/ui/DragOrderGridView;->h:I

    invoke-virtual {p0}, Lcom/xingbook/ui/DragOrderGridView;->getFirstVisiblePosition()I

    move-result v1

    sub-int/2addr v0, v1

    invoke-virtual {p0, v0}, Lcom/xingbook/ui/DragOrderGridView;->getChildAt(I)Landroid/view/View;

    move-result-object v0

    iput-object v0, p0, Lcom/xingbook/ui/DragOrderGridView;->i:Landroid/view/View;

    iget v0, p0, Lcom/xingbook/ui/DragOrderGridView;->e:I

    iget-object v1, p0, Lcom/xingbook/ui/DragOrderGridView;->i:Landroid/view/View;

    invoke-virtual {v1}, Landroid/view/View;->getTop()I

    move-result v1

    sub-int/2addr v0, v1

    iput v0, p0, Lcom/xingbook/ui/DragOrderGridView;->o:I

    iget v0, p0, Lcom/xingbook/ui/DragOrderGridView;->d:I

    iget-object v1, p0, Lcom/xingbook/ui/DragOrderGridView;->i:Landroid/view/View;

    invoke-virtual {v1}, Landroid/view/View;->getLeft()I

    move-result v1

    sub-int/2addr v0, v1

    iput v0, p0, Lcom/xingbook/ui/DragOrderGridView;->p:I

    invoke-virtual {p1}, Landroid/view/MotionEvent;->getRawY()F

    move-result v0

    iget v1, p0, Lcom/xingbook/ui/DragOrderGridView;->e:I

    int-to-float v1, v1

    sub-float/2addr v0, v1

    float-to-int v0, v0

    iput v0, p0, Lcom/xingbook/ui/DragOrderGridView;->q:I

    invoke-virtual {p1}, Landroid/view/MotionEvent;->getRawX()F

    move-result v0

    iget v1, p0, Lcom/xingbook/ui/DragOrderGridView;->d:I

    int-to-float v1, v1

    sub-float/2addr v0, v1

    float-to-int v0, v0

    iput v0, p0, Lcom/xingbook/ui/DragOrderGridView;->r:I

    invoke-virtual {p0}, Lcom/xingbook/ui/DragOrderGridView;->getHeight()I

    move-result v0

    div-int/lit8 v0, v0, 0x4

    iput v0, p0, Lcom/xingbook/ui/DragOrderGridView;->t:I

    invoke-virtual {p0}, Lcom/xingbook/ui/DragOrderGridView;->getHeight()I

    move-result v0

    mul-int/lit8 v0, v0, 0x3

    div-int/lit8 v0, v0, 0x4

    iput v0, p0, Lcom/xingbook/ui/DragOrderGridView;->u:I

    iget-object v0, p0, Lcom/xingbook/ui/DragOrderGridView;->i:Landroid/view/View;

    const/4 v1, 0x1

    invoke-virtual {v0, v1}, Landroid/view/View;->setDrawingCacheEnabled(Z)V

    iget-object v0, p0, Lcom/xingbook/ui/DragOrderGridView;->i:Landroid/view/View;

    invoke-virtual {v0}, Landroid/view/View;->getDrawingCache()Landroid/graphics/Bitmap;

    move-result-object v0

    invoke-static {v0}, Landroid/graphics/Bitmap;->createBitmap(Landroid/graphics/Bitmap;)Landroid/graphics/Bitmap;

    move-result-object v0

    iput-object v0, p0, Lcom/xingbook/ui/DragOrderGridView;->n:Landroid/graphics/Bitmap;

    iget-object v0, p0, Lcom/xingbook/ui/DragOrderGridView;->i:Landroid/view/View;

    invoke-virtual {v0}, Landroid/view/View;->destroyDrawingCache()V

    goto/16 :goto_0

    :pswitch_1
    invoke-virtual {p1}, Landroid/view/MotionEvent;->getX()F

    move-result v0

    float-to-int v0, v0

    invoke-virtual {p1}, Landroid/view/MotionEvent;->getY()F

    move-result v1

    float-to-int v1, v1

    iget-object v2, p0, Lcom/xingbook/ui/DragOrderGridView;->i:Landroid/view/View;

    invoke-direct {p0, v2, v0, v1}, Lcom/xingbook/ui/DragOrderGridView;->a(Landroid/view/View;II)Z

    move-result v0

    if-nez v0, :cond_0

    iget-object v0, p0, Lcom/xingbook/ui/DragOrderGridView;->w:Landroid/os/Handler;

    iget-object v1, p0, Lcom/xingbook/ui/DragOrderGridView;->x:Ljava/lang/Runnable;

    invoke-virtual {v0, v1}, Landroid/os/Handler;->removeCallbacks(Ljava/lang/Runnable;)V

    goto/16 :goto_0

    :pswitch_2
    iget-object v0, p0, Lcom/xingbook/ui/DragOrderGridView;->w:Landroid/os/Handler;

    iget-object v1, p0, Lcom/xingbook/ui/DragOrderGridView;->x:Ljava/lang/Runnable;

    invoke-virtual {v0, v1}, Landroid/os/Handler;->removeCallbacks(Ljava/lang/Runnable;)V

    iget-object v0, p0, Lcom/xingbook/ui/DragOrderGridView;->w:Landroid/os/Handler;

    iget-object v1, p0, Lcom/xingbook/ui/DragOrderGridView;->y:Ljava/lang/Runnable;

    invoke-virtual {v0, v1}, Landroid/os/Handler;->removeCallbacks(Ljava/lang/Runnable;)V

    goto/16 :goto_0

    :pswitch_data_0
    .packed-switch 0x0
        :pswitch_0
        :pswitch_2
        :pswitch_1
    .end packed-switch
.end method

.method public onTouchEvent(Landroid/view/MotionEvent;)Z
    .locals 2

    iget-boolean v0, p0, Lcom/xingbook/ui/DragOrderGridView;->b:Z

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/xingbook/ui/DragOrderGridView;->j:Landroid/widget/ImageView;

    if-eqz v0, :cond_0

    invoke-virtual {p1}, Landroid/view/MotionEvent;->getAction()I

    move-result v0

    packed-switch v0, :pswitch_data_0

    :goto_0
    const/4 v0, 0x1

    :goto_1
    return v0

    :pswitch_0
    invoke-virtual {p1}, Landroid/view/MotionEvent;->getX()F

    move-result v0

    float-to-int v0, v0

    iput v0, p0, Lcom/xingbook/ui/DragOrderGridView;->f:I

    invoke-virtual {p1}, Landroid/view/MotionEvent;->getY()F

    move-result v0

    float-to-int v0, v0

    iput v0, p0, Lcom/xingbook/ui/DragOrderGridView;->g:I

    iget v0, p0, Lcom/xingbook/ui/DragOrderGridView;->f:I

    iget v1, p0, Lcom/xingbook/ui/DragOrderGridView;->g:I

    invoke-direct {p0, v0, v1}, Lcom/xingbook/ui/DragOrderGridView;->a(II)V

    goto :goto_0

    :pswitch_1
    invoke-direct {p0}, Lcom/xingbook/ui/DragOrderGridView;->b()V

    const/4 v0, 0x0

    iput-boolean v0, p0, Lcom/xingbook/ui/DragOrderGridView;->b:Z

    goto :goto_0

    :cond_0
    invoke-super {p0, p1}, Landroid/widget/GridView;->onTouchEvent(Landroid/view/MotionEvent;)Z

    move-result v0

    goto :goto_1

    nop

    :pswitch_data_0
    .packed-switch 0x1
        :pswitch_1
        :pswitch_0
    .end packed-switch
.end method

.method public setAlowDrag(Z)V
    .locals 0

    iput-boolean p1, p0, Lcom/xingbook/ui/DragOrderGridView;->c:Z

    return-void
.end method

.method public setDragResponseMS(J)V
    .locals 0

    iput-wide p1, p0, Lcom/xingbook/ui/DragOrderGridView;->a:J

    return-void
.end method

.method public setOnChangeListener(Lcom/xingbook/ui/c;)V
    .locals 0

    iput-object p1, p0, Lcom/xingbook/ui/DragOrderGridView;->v:Lcom/xingbook/ui/c;

    return-void
.end method
